# Author: Ziyin
# 课程表_优化版
# 非会员每天可以使用5次
normal_user_data = "Ziyin"
normal_user_password = "012345"
count_2 = 5
# 会员每天可以使用10次
vip_user_data = "Juicy"
vip_user_password = "678910"
count_3 = 10
# 3次登录
count = 3
# 赋值
week1 = "星期一"
week2 = "星期二"
week3 = "星期三"
week4 = "星期四"
week5 = "星期五"
week6 = "星期六"
week7 = "星期天"
# 使用时间模块导入sleep函数
import time
# while循环
while True:
    username = input("请输入正确的账号：")
    password = input("请输入正确的密码：")
    count -=1
    if username == normal_user_data:
        if password == normal_user_password:
            print("登陆成功，欢迎(普通用户)",username,"使用,今日您有5次机会查询")
            time.sleep(2)
            while count_2 > 0:
                count_2 -= 1
                week = str(input('你想查询星期几的课表(例如：星期一)：'))
                if week == week1:
                    print("以下是您周一的课表（24小时制）")
                    print("9:45-12:00 python课")
                    print("14:30-15:55 美学与艺术原理")
                elif week == week2:
                    print("以下是您周二的课表（24小时制）")
                    print("8:00-9:30 传统体育养生")
                    print("14:30-15:55 H5互动与应用")
                elif week == week3:
                    print("以下是您周三的课表（24小时制）")
                    print("9:45-12:00 毛概理论")
                    print("18:45-20:10 大学英语")
                elif week == week4:
                    print("以下是您周四的课表（24小时制）")
                    print("10:35-12:00 毛概实践")
                    print("14:30-15:55 广告文案写作")
                    print("18:45-20:10 日本史")
                elif week == week5:
                    print("以下是您周五的课表（24小时制）")
                    print("8:00-9:30 AI应用")
                    print("10:35-12:00 大学英语")
                elif week == week6:
                    print("周六休息，您没有课程安排")
                elif week == week7:
                    print("周日休息，您没有课程安排")
                else:
                    print("请按星期（）的格式查询")
            else:
                print("今日查询次数用完啦，24小时后再来尝试吧")
                break
        else:
            if count == 0:
                print("您的账号被锁定了哦，想想正确的账号密码吧~ 2分钟之后再来尝试")
                time.sleep(120)  # 添加等待时间
            else:
                print("您的账号或密码不正确，您还有", count, "次机会")
    elif username == vip_user_data:
        if password == vip_user_password:
            print("登陆成功，欢迎(vip用户)",username,"使用,今日您有10次机会查询")
            time.sleep(2)
            while count_3 > 0:
                count_3 -= 1
                week = str(input('你想查询星期几的课表(例如：星期一)：'))
                if week == week1:
                    print("以下是您周一的课表（24小时制）")
                    print("9:45-12:00 python课")
                    print("14:30-15:55 美学与艺术原理")
                elif week == week2:
                    print("以下是您周二的课表（24小时制）")
                    print("8:00-9:30 传统体育养生")
                    print("14:30-15:55 H5互动与应用")
                elif week == week3:
                    print("以下是您周三的课表（24小时制）")
                    print("9:45-12:00 毛概理论")
                    print("18:45-20:10 大学英语")
                elif week == week4:
                    print("以下是您周四的课表（24小时制）")
                    print("10:35-12:00 毛概实践")
                    print("14:30-15:55 广告文案写作")
                    print("18:45-20:10 日本史")
                elif week == week5:
                    print("以下是您周五的课表（24小时制）")
                    print("8:00-9:30 AI应用")
                    print("10:35-12:00 大学英语")
                elif week == week6:
                    print("周六休息，您没有课程安排")
                elif week == week7:
                    print("周日休息，您没有课程安排")
                else:
                    print("请按星期（）的格式查询")
            else:
                print("今日查询次数用完啦，24小时后再来尝试吧")
                break
        else:
            if count == 0:
                print("您的账号被锁定了哦，想想正确的账号密码吧~ 2分钟之后再来尝试")
                time.sleep(120)
            else:
                print("您的账号或密码不正确，您还有", count, "次机会")
    elif count == 0:
        print("您的账号被锁定了哦，想想正确的账号密码吧~ 2分钟之后再来尝试")
        time.sleep(120)
    else:
        print("您的账号或密码不正确，您还有",count,"次机会")